-
-
Notifications
You must be signed in to change notification settings - Fork 52
Handle metadata discovery at creation of AudioObjects #793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
cd1839c to
afd600b
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
danirabbit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely cleans up the PlaybackManager. Adding a MetadataDiscoverer singleton makes sense to me. Just one question
| public void update_metadata (Gst.PbUtils.DiscovererInfo info) { | ||
| duration = (int64) info.get_duration (); | ||
|
|
||
| unowned Gst.TagList? tag_list = info.get_tags (); | ||
|
|
||
| string _title; | ||
| tag_list.get_string (Gst.Tags.TITLE, out _title); | ||
| if (_title != null) { | ||
| title = _title; | ||
| } | ||
|
|
||
| string _artist; | ||
| tag_list.get_string (Gst.Tags.ARTIST, out _artist); | ||
| if (_artist != null) { | ||
| artist = _artist; | ||
| } else if (_title != null) { // Don't set artist for files without tags | ||
| artist = _("Unknown"); | ||
| } | ||
|
|
||
| var sample = get_cover_sample (tag_list); | ||
| if (sample != null) { | ||
| var buffer = sample.get_buffer (); | ||
|
|
||
| if (buffer != null) { | ||
| texture = Gdk.Texture.for_pixbuf (get_pixbuf_from_buffer (buffer)); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These properties are all publicly settable so why do this here instead of in the MetadataDiscoverer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this probably should be moved into the MetadataDiscoverer. Sorry I didn't have much time the last 2 weeks, but I'll have a lot more time from wednesday onward to update this.
|
New conflict to resolve @Oowoosh0 |
Fixes #693
Fixes #775
Closes #697